﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using IBatisNet.DataMapper;
using TumbaloSoft.Models;

namespace TumbaloSoft.Helpers
{
    public class HelperBanco
    {
        static public List<Banco> selectAll()
        {
            return new List<Banco>(Mapper.Instance().QueryForList<Banco>("BancoSelectAll", null));
        }
        static public Banco selectById(int id)
        {
            IList lista= Mapper.Instance().QueryForList("BancoSelectById", id);
            if (lista.Count == 0) return new Banco();
            Banco banco = (Banco)lista[0];
            return banco;
        }
    }
}